package net.melon.order.pojo;

import java.util.Date;

import net.esj.basic.pojo.AbstractPojo;
import net.melon.cata.inst.eg.region.Region;
import net.melon.product.pojo.Product;
import net.melon.sso.pojo.Member;


public class Order extends AbstractPojo<String>{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 8409722271666642831L;
	
	public static enum OrderState{
		DELETE(-1),
		NO_PAY(1),
		NO_PUT_CAR(2),
		PUT_CAR(3);
		private int state;
		
		private OrderState(int state){
			this.state = state;
		}
		
		public static OrderState valueOf(int state){
			for(OrderState st : values()){
				if(st.getState() == state){
					return st;
				}
			}
			return null;
		}

		public int getState() {
			return state;
		}

		public void setState(int state) {
			this.state = state;
		}
		
	}

	private String id;
	
	private Product product;
	
	private String colour;
	
	private Region region;
	
	private Date gmtCreate;
	
	private Member member;
	
	private int state;
	
	private double price;
	
	private double prepay;
	
	private String remarks;
	
	private Date payTime;
	
	private Date putTime;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

	public String getColour() {
		return colour;
	}

	public void setColour(String colour) {
		this.colour = colour;
	}

	public Region getRegion() {
		return region;
	}

	public void setRegion(Region region) {
		this.region = region;
	}

	public Date getGmtCreate() {
		return gmtCreate;
	}

	public void setGmtCreate(Date gmtCreate) {
		this.gmtCreate = gmtCreate;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public Member getMember() {
		return member;
	}

	public void setMember(Member member) {
		this.member = member;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public double getPrepay() {
		return prepay;
	}

	public void setPrepay(double prepay) {
		this.prepay = prepay;
	}

	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public Date getPayTime() {
		return payTime;
	}

	public void setPayTime(Date payTime) {
		this.payTime = payTime;
	}

	public Date getPutTime() {
		return putTime;
	}

	public void setPutTime(Date putTime) {
		this.putTime = putTime;
	}
}
